home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / mask.z / mask
Encoding:
Text File  |  2002-10-03  |  5.4 KB  |  151 lines

  1. MASK(3I)                                              Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      __mmaasskk, __mmaasskkll, __mmaasskkrr, MMAASSKK - Returns a bit mask
  6.  
  7. SSYYNNOOPPSSIISS
  8.      C/C++:
  9.  
  10.      ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
  11.      lloonngg __mmaasskk ((lloonngg _i));;
  12.      lloonngg __mmaasskkll ((lloonngg _i));;
  13.      lloonngg __mmaasskkrr ((lloonngg _i));;
  14.  
  15.      Fortran:
  16.  
  17.      MMAASSKK (([II==]_i))
  18.  
  19. IIMMPPLLEEMMEENNTTAATTIIOONN
  20.      C/C++:  UNICOS and UNICOS/mk systems
  21.  
  22.      Fortran:  UNICOS, UNICOS/mk, and IRIX systems
  23.  
  24.      CF90, MIPSpro 7 Fortran 90
  25.  
  26. SSTTAANNDDAARRDDSS
  27.      C/C++ extension
  28.  
  29.      Fortran extension
  30.  
  31. DDEESSCCRRIIPPTTIIOONN
  32.    CC++++
  33.      The __mmaasskk function forms a mask of bits set to 1, left-justified or
  34.      right-justified.  If 0 <= _i <= 63, a left-justified mask of bits set
  35.      to 1, _i bits long, is formed.  Otherwise, a right-justified mask of
  36.      bits set to 1, (128 - _i) bits long, is formed.  Value _i must be in the
  37.      range of 0 through 128.
  38.  
  39.      The __mmaasskkll function returns a left-justified mask of _i bits set to 1.
  40.      Value _i must be in the range of 0 through 64.
  41.  
  42.      The __mmaasskkrr function returns a right-justified mask of _i bits set to 1.
  43.      Value _i must be in the range of 0 through 64.
  44.  
  45.      Because these are intrinsic functions, no externally visible library
  46.      functions are available for them.  The compiler generates inline code
  47.      to produce the result.
  48.  
  49.    FFoorrttrraann
  50.      The MMAASSKK function returns a bit mask of 1's.
  51.  
  52.      On UNICOS systems, the argument is a 64-bit integer.
  53.  
  54.      On UNICOS/mk systems, the argument is a 32-bit or 64-bit integer.
  55.  
  56.      On IRIX systems, the argument is an 8-bit, 16-bit, 32-bit, or 64-bit
  57.      integer.
  58.  
  59.      It accepts the following argument:
  60.  
  61.      _i    In Fortran, this must be an integer argument, as follows:
  62.  
  63.           * If _i is an 8-bit object, _i must be in the range 0 <= _i <= 16.
  64.  
  65.           * If _i is a 16-bit object, _i must be in the range 0 <= _i <= 32.
  66.  
  67.           * If _i is a 32-bit object, _i must be in the range 0 <= _i <= 64.
  68.  
  69.           * If _i is a 64-bit object, _i must be in the range 0 <= _i <= 128.
  70.  
  71.      MMAASSKK is an elemental function.  The name of this function cannot be
  72.      passed as an argument.
  73.  
  74.      This is an outmoded routine.  Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e
  75.      _M_a_n_u_a_l, _V_o_l_u_m_e _2, for information about outmoded features and their
  76.      preferred standard alternatives.
  77.  
  78. RREETTUURRNN VVAALLUUEESS
  79.      In C/C++, the mask functions return a 64-bit object.
  80.  
  81.      In Fortran, MMAASSKK returns a Boolean result on UNICOS and UNICOS/mk
  82.      systems.  It returns an integer result on IRIX systems.
  83.  
  84.      When _i is a 64-bit object, the return values are of the following
  85.      form:
  86.  
  87.      * If _i is in the range 0 <= _i <= 64, a left-justified mask of _i bits
  88.        is returned.
  89.  
  90.      * If _i is in the range 65 <= _i <= 128, a right-justified mask of (128
  91.        - _i) bits is returned.
  92.  
  93.      When _i is a 32-bit object, the return values are of the following
  94.      form:
  95.  
  96.      * If _i is in the range 0 <= _i <= 32, a left-justified mask of _i bits
  97.        is returned.
  98.  
  99.      * If _i is in the range 33 <= _i <= 64, a right-justified mask of (64 -
  100.        _i) bits is returned.
  101.  
  102.      When _i is a 16-bit object, the return values are of the following
  103.      form:
  104.  
  105.      * If _i is in the range 0 <= _i <= 16, a left-justified mask of _i bits
  106.        is returned.
  107.  
  108.      * If _i is in the range 17 <= _i <= 32, a right-justified mask of (32 -
  109.        _i) bits is returned.
  110.  
  111.      When _i is a 8-bit object, the return values are of the following form:
  112.  
  113.      * If _i is in the range 0 <= _i <= 8, a left-justified mask of _i bits is
  114.        returned.
  115.  
  116.      * If _i is in the range 7 <= _i <= 16, a right-justified mask of (16 -
  117.        _i) bits is returned.
  118.  
  119. EEXXAAMMPPLLEESS
  120.      Fortran:  The following section of Fortran code shows the MMAASSKK
  121.      function used with several different arguments.  The bit patterns of
  122.      the results are given.
  123.  
  124.           INTEGER I1, I2, I3
  125.           ...
  126.           I1 = MASK(3)
  127.           I2 = MASK(64)
  128.           I3 = MASK(127)
  129.  
  130.            -----------------------------------------------------
  131.           | 1 | 1 | 1 | 0 | 0 | 0 | 0 |    ...    | 0 | 0 | 0 |
  132.            -----------------------------------------------------
  133.                                      I1
  134.  
  135.            ---------------------------------------------
  136.           | 1 | 1 | 1 | 1 |    ...    | 1 | 1 | 1 | 1 |
  137.            ---------------------------------------------
  138.                               I2
  139.  
  140.            ---------------------------------------------
  141.           | 0 | 0 | 0 | 0 |    ...    | 0 | 0 | 0 | 1 |
  142.            ---------------------------------------------
  143.                               I3
  144.  
  145. SSEEEE AALLSSOO
  146.      A complete list of C/C++ intrinsic functions available on UNICOS and
  147.      UNICOS/mk systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
  148.  
  149.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  150.      man page.
  151.